package com.xsw.edu.service.impl;

import com.xsw.edu.mapper.StudentMapper;
import com.xsw.edu.model.Student;
import com.xsw.edu.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by lenovo on 2019/7/4.
 */
@Service
public class StudentServiceImpl implements StudentService {

    @Autowired
    private StudentMapper studentMapper;

    @Override
    public Student findById(Integer id) {
        Student student = studentMapper.findById(id);
        return student;
    }

    @Override
    public List<Student> findAllStudent() {
        List<Student> list = studentMapper.findAllStudent();
        return list;
    }

    @Override
    public void insertStudent(Student student) {
        System.out.println("service student:"+student);
        studentMapper.insertStudent(student);
    }

    @Override
    public void deleteById(Integer id) {

    }

    @Override
    public void update(Student student) {

    }

    @Override
    public void insert(Student student) {

    }
}
